home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 2 / Amiga Tools 2.iso / tools / packer / lhlib / lhlib.h < prev    next >
C/C++ Source or Header  |  1995-03-09  |  2KB  |  103 lines

  1. /* $Revision Header * Header built automatically - do not edit! *************
  2.  *
  3.  *    (C) Copyright 1990 by Holger P. Krekel & Olaf 'Olsen' Barthel
  4.  *
  5.  *    Name .....: lhlib.h
  6.  *    Created ..: Tuesday 10-Jul-90 21:31
  7.  *    Revision .: 0
  8.  *
  9.  *    Date            Author          Comment
  10.  *    =========       ========        ====================
  11.  *    22-Jul-90       Olsen           Pragmas & ENCODEEXTRA
  12.  *    10-Jul-90       Olsen           Created this file!
  13.  *
  14.  * $Revision Header ********************************************************/
  15.  
  16. #ifndef _LHLIB_H
  17. #define _LHLIB_H 1
  18.  
  19. #ifndef    EXEC_LIBRARIES_H
  20. #include <exec/libraries.h>
  21. #endif    /* EXEC_LIBRARIES_H */
  22.  
  23.     /* Name of lh.library */
  24.  
  25. #define LH_NAME        "lh.library"
  26.  
  27.     /* Lowest revision currently in use. */
  28.  
  29. #define LH_VERSION    1
  30.  
  31.     /* Additional amount of memory required for data compression. */
  32.  
  33. #define ENCODEEXTRA(n) ((n + 7) >> 3)
  34.  
  35.     /* Standard LhBuffer structure as used by LhEncode/LhDecode. */
  36.  
  37. struct LhBuffer
  38. {
  39.     APTR    lh_Src;        /* Source data. */
  40.     ULONG    lh_SrcSize;    /* Size of source data. */
  41.  
  42.     APTR    lh_Dst;        /* Destination data. */
  43.     ULONG    lh_DstSize;    /* Size of destination data. */
  44.  
  45.     APTR    lh_Aux;        /* Auxilary buffer (private!) */
  46.     ULONG    lh_AuxSize;    /* Size of auxilary buffer (private!) */
  47.  
  48.     ULONG    lh_Reserved;    /* Reserved for future extension. */
  49. };
  50.  
  51.     /* Do the prototypes & pragma calls. */
  52.  
  53. #ifdef __NO_PROTOS
  54. #undef __NO_PROTOS
  55. #endif    /* __NO_PROTOS */
  56.  
  57. #ifdef AZTEC_C
  58.  
  59. #ifndef __VERSION
  60. #define __VERSION 360
  61. #endif    /* __VERSION */
  62.  
  63. #if __VERSION < 500
  64. #define __NO_PROTOS    1
  65. #define __NO_PRAGMAS    1
  66. #endif    /* __VERSION */
  67.  
  68. #endif    /* AZTEC_C */
  69.  
  70. #ifdef __NO_PROTOS
  71. #define __ARGS(x) ()
  72. #else
  73. #define __ARGS(x) x
  74. #endif    /* __NO_PROTOS */
  75.  
  76.     /* Function prototypes. */
  77.  
  78. struct LhBuffer    *    CreateBuffer __ARGS((LONG OnlyDecode));
  79. VOID            DeleteBuffer __ARGS((struct LhBuffer *));
  80.  
  81. ULONG            LhEncode __ARGS((struct LhBuffer *));
  82. ULONG            LhDecode __ARGS((struct LhBuffer *));
  83.  
  84.     /* Function pragmas. */
  85.  
  86. #ifndef __NO_PRAGMAS
  87.  
  88. #ifdef AZTEC_C
  89. #pragma amicall(LhBase, 0x1e, CreateBuffer(d0))
  90. #pragma amicall(LhBase, 0x24, DeleteBuffer(a0))
  91. #pragma amicall(LhBase, 0x2a, LhEncode(a0))
  92. #pragma amicall(LhBase, 0x30, LhDecode(a0))
  93. #else    /* LATTICE */
  94. #pragma libcall LhBase CreateBuffer 1e 1
  95. #pragma libcall LhBase DeleteBuffer 24 801
  96. #pragma libcall LhBase LhEncode 2a 801
  97. #pragma libcall LhBase LhDecode 30 801
  98. #endif    /* AZTEC_C */
  99.  
  100. #endif    /* __NO_PRAGMAS */
  101.  
  102. #endif    /* _LHLIB_H */
  103.